//
//  JZHBCViewController.m
//  极致荟
//
//  Created by hetao on 14-8-26.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "JZHBCViewController.h"
#import <QuartzCore/QuartzCore.h>
@interface JZHBCViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scorll;
@property (nonatomic,copy) NSString *nstr;

@end

@implementation JZHBCViewController
- (id)initlu:(NSString *)str
{
    JZHBCViewController *bcv=[[JZHBCViewController alloc] init];
    bcv.nstr=str;
    return bcv;
}
- (IBAction)back:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:^{
            }];
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        
    }
    return self;
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [self showv];
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.lable.text=self.nstr;
    [self.scorll setContentSize:CGSizeMake(0, 735)];
    
   
    
    // Do any additional setup after loading the view from its nib.
}

- (void)showv
{
    self.tview.hidden=NO;
 [UIView animateWithDuration:.5 animations:^{
     [self.tview setFrame:CGRectMake(0, 60, self.tview.frame.size.width, self.tview.frame.size.height)];
 } completion:^(BOOL finished) {
    
     [self performSelector:@selector(hieed) withObject:self afterDelay:1];
 }];
    
}

- (void)hieed
{
    [UIView animateWithDuration:.5 animations:^{
         [self.tview setFrame:CGRectMake(320, 60, self.tview.frame.size.width, self.tview.frame.size.height)];
    } completion:^(BOOL finished) {
        self.tview.hidden=YES;
         [self.tview setFrame:CGRectMake(-330, 60, self.tview.frame.size.width, self.tview.frame.size.height)];
    }];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)dac:(UIButton *)sender
{
   
        [self showv];
    
}
@end
